<?php require_once(dirname(__FILE__).'/inc/config.inc.php');IsModelPriv('infolist'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>修改列表信息</title>
<link href="templates/style/admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/getuploadify.js"></script>
<script type="text/javascript" src="templates/js/checkf.func.js"></script>
<script type="text/javascript" src="templates/js/getjcrop.js"></script>
<script type="text/javascript" src="templates/js/getinfosrc.js"></script>
<script type="text/javascript" src="plugin/colorpicker/colorpicker.js"></script>
<script type="text/javascript" src="plugin/calendar/calendar.js"></script>
<script type="text/javascript" src="templates/js/getHuxing.js"></script>
</head>
<body>
<?php
$row = $dosql->GetOne("SELECT * FROM `#@__fang` WHERE `id`=$id");
$lpid=$row['lpid'];
?>
<div class="formHeader"> <span class="title">修改房间信息</span> <a href="javascript:location.reload();" class="reload">刷新</a> </div>
<form name="form" id="form" method="post" action="fang_save.php" onsubmit="return cfm_infolm();">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable">
		<tr>
			<td width="25%" height="40" align="right">所属房间：</td>
			<td width="75%">
			  <select name="lpid" id="lpid"  onchange="XuanLouPan(this.value,'hxid');">
					<option value="-1">请选择房间</option>
					<?php
					//权限验证
					if($cfg_adminlevel == 1)
					{
						$dosql->Execute("SELECT * FROM `#@__loupan`  WHERE `checkinfo`='true' AND delstate='' ");
					}else{
						$lpid=$cfg_lpid;
						$dosql->Execute("SELECT * FROM `#@__loupan`  WHERE `checkinfo`='true' AND delstate='' AND id=$lpid ");
					}
					while($row2 = $dosql->GetArray())
					{
						if($lpid == $row2['id'])
							$selected = 'selected="selected"';
						else
							$selected = '';
							
						echo '<option value="'.$row2['id'].'" '.$selected.'>'.$row2['title'].'</option>';
					}
					?>
				</select>
				<span class="maroon">*</span><span class="cnote">带<span class="maroon">*</span>号表示为必填项</span></td>
		</tr>

		<tr>
			<td height="40" align="right">标　题：</td>
			<td><input type="text" name="title" id="title" class="input"  value="<?php echo $row['title']; ?>"  /><span class="maroon">*</span>
				</td>
		</tr>

		<tr>
			<td height="40" align="right"> 楼号：</td>
			<td><input type="text" name="louhao" id="louhao" class="input" value="<?php echo $row['louhao']; ?>"/><span class="maroon">*</span></td>
		</tr>
		<tr>
			<td height="40" align="right">单元号：</td>
			<td><input type="text" name="danyuan" id="danyuan" class="input"  value="<?php echo $row['danyuan']; ?>"/><span class="maroon">*</span></td>
		</tr>
		<tr>
			<td height="40" align="right">楼层：</td>
			<td><input type="text" name="louceng" id="louceng" class="input" value="<?php echo $row['louceng']; ?>"/><span class="maroon">*</span></td>
		</tr>
		<tr>
			<td height="40" align="right">房间号：</td>
			<td><input type="text" name="fanghao" id="fanghao" class="input"  value="<?php echo $row['fanghao']; ?>"/><span class="maroon">*</span>该房间在该楼层的号码。10层1号房间 请填写1.  非房间在房管局系统的房号</td>
		</tr>
		<tr>
			<td height="40" align="right">户型图：</td>
			<td>
			  <select name="hxid" id="hxid"  onchange="XuanHuXing(this.value);">
              		<option value="<?php echo $row['hxid']?>"><?php echo GetHuXingName($row['hxid'])?></option>
					
			  </select>
            
            <span class="maroon">*</span></td>
		</tr>
		<tr >
			<td height="200" align="right">户型信息：</td>
			<td>
					<div class="result" id="result">
						<div class="h_info">
                            <div class="h_pic"><img src="/<?php echo $row['picurl'];?>" width="200/"><p>户型图</p></div>
                            <ul class="h_txt">
                            <li>面积：<input class="inputs" style="width:50px;" name="mianji" value="<?php echo $row['mianji'];?>">平方米</li>
                            <li>总价：<input class="inputs" style="width:50px;" name="zongjia" value="<?php echo $row['zongjia'];?>">万元</li>
                            </ul>
                      	</div>
                    
                    </div>
			</td>
		</tr>
		<tr class="nb">
			<td height="40" align="right"> 已售：</td>
			<td><input type="radio" name="is_sale" value="true"   />
				是 &nbsp;
				<input type="radio" name="is_sale" value="false"  checked="checked" />
				否<span class="cnote">选择"否"为在售，"是"为售出</span></td>
		</tr>
		
		
		<tr>
			<td height="40" align="right">作者编辑：</td>
			<td><input type="text" name="author" id="author" class="input" value="<?php echo $row['author']; ?>" /></td>
		</tr> 
		<tr>
			<td height="40" align="right">排列排序：</td>
			<td><input type="text" name="orderid" id="orderid" class="inputos" value="<?php echo $row['orderid']; ?>" /></td>
		</tr>
		<tr>
			<td height="40" align="right">更新时间：</td>
			<td><input name="posttime" type="text" id="posttime" class="inputms" value="<?php echo GetDateTime($row['posttime']); ?>" readonly="readonly" />
				<script type="text/javascript">
				date = new Date();
				Calendar.setup({
					inputField     :    "posttime",
					ifFormat       :    "%Y-%m-%d %H:%M:%S",
					showsTime      :    true,
					timeFormat     :    "24"
				});
				</script></td>
		</tr>
		<tr class="nb">
			<td height="40" align="right">审　核：</td>
			<td><input type="radio" name="checkinfo" value="true" <?php if($row['checkinfo'] == 'true') echo 'checked="checked"'; ?> />
				是 &nbsp;
				<input type="radio" name="checkinfo" value="false" <?php if($row['checkinfo'] == 'false') echo 'checked="checked"'; ?> />
				否<span class="cnote">选择“否”则该信息暂时不显示在前台</span></td>
		</tr>
	</table>
	<div class="formSubBtn">
		<input type="submit" class="btn btn-success" value="提交" />
		<input type="button" class="back" value="返回" onclick="history.go(-1);" />
		<input type="hidden" name="action" id="action" value="update" />
		<input type="hidden" name="id" id="id" value="<?php echo $id; ?>" />
	</div>
</form>
</body>
</html>